#ifndef WIDGET_H
#define WIDGET_H

#include "gamescene.h"
#include "maploader.h"
#include "nextmaploder.h"
#include <QWidget>

#include <QMediaPlayer>
#include <QAudioOutput>
QT_BEGIN_NAMESPACE
namespace Ui {
class Widget;
}
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT


public:
    QMediaPlayer *player = nullptr;
    QAudioOutput *audioOutput = nullptr;
    void setbackground();
    Widget(QWidget *parent = nullptr);
    ~Widget();
    //void resizeEvent(QResizeEvent* event);

private:
    GameScene*gameScenetwo=nullptr;
    nextmaploder*maptwo=nullptr;
    maploader*map=nullptr;
    Ui::Widget *ui;
    GameScene *gameScene=nullptr;
public slots:
    void switchtorealwin();
    void switchtonextGamePage();
    void switchToGamePage();
    void switchgameoverpage();
    void restart();
    void switchgamewinpage();
};
#endif // WIDGET_H
